Vehicle File Import
Introduction
This is generic vehicle file import for any manufacturer. This will import vehicle file to Cloud SQL for PostgreSQL
Applicable Manufacturers
- KIA
Fields
Field Name | Description | Datatype | Validation | Max length | Mandatory | Example |
Registration | Vehicle Reg Number | String | A-Z and 0-9 & All Special Char | 10 | N | MH12JBS |
VIN | VIN | String | A-Z and 0-9 | 17 | Y | ABC2D4GHY47524999 |
MIOCN | Model | string | A-Z and 0-9 | 20 | Y | ASW5ZHZ7ZKK732 |
ModelYr | Model Year | Number | 0-9 | 4 | Y | 2024 |
Note: If there are more columns in the csv, those will be ignored
Importing a file
Preparation
- Upload the file with filename as
vehicle_reg.csv
intofnp-imports/{manufacturer}
(E.g.fnp-imports/kia
) storage bucket
Validation
Through Cloud Scheduler
- Go to Cloud Scheduler
- Run Manufacturer_vehicle_file_validation job (job name could be different on other env)
Local
- Add the
vehicle.csv
file inimportFiles
folder - Run
npm run validate:vehicle
can control the number of lines to validate using -l(number of lines), -s (start line) and -m (manufacturer)arguments
Importing
Through Cloud Scheduler
- Go to Cloud Scheduler
- Run Manufacturer_vehicle_file_import job (job name could be different on other env)
Local
Same as Validation, just the command is npm run import:vehicle
Testing
- Data will be inserted to Cloud SQL for PostgreSQL under
fpn
database in tablevehicle
.
Status: Accepted
Category: Protected
Authored By: Gladson on Feb 07, 2025
Revisions